package com.xiezc.util;


import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by Administrator on 2017/5/19.
 */
public class XUtil {

    static Random random = new Random();
    static AtomicInteger atomicInteger = new AtomicInteger(random.nextInt());

    public static final  String WAIT_UP_FILE="WAIT_UP_FILE";

    public static void main(String[] args) throws IOException {
        Path path = Paths.get("D:\\TBServerFilePath");
        Files.deleteIfExists(path);
        Files.createDirectory(path);
    }


    private XUtil() {

    }

    public static int getOnlyInt() {
        return atomicInteger.getAndAdd(1);
    }

    public static String getUUID() {
        return UUID.randomUUID().toString();
    }


}
